import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    userPhoto: 'https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fc-ssl.duitang.com%2Fuploads%2Fblog%2F202107%2F23%2F20210723125859_f6b2f.thumb.1000_0.jpeg&refer=http%3A%2F%2Fc-ssl.duitang.com&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1667441848&t=33cb7f24c6e3cafcedaff016d86d91f5', // 图片地址(默认值)
    userName: '毛毛' // 用户名称
  },
  getters: {
  },
  mutations: {
    // 设置图片路径
    SET_PHOTO(state, value) {
      state.userPhoto = value
    },
    // 设置用户名称
    SET_NAME(state, value) {
      state.userName = value
    }
  },
  actions: {
  },
  modules: {
  }
})
